var express = require('express');
var router = express.Router();

const scoreModel = require('../models/detail.js')

/* GET home page. */
router.get('/data', function(req, res, next) {
  // get req.query
  // post req.body
  const {id} = req.query;
  scoreModel.findOne({id : id} ,(err, doc) => {
    if(err) throw err;
    res.json({
      status: 0,
      result: doc
    })
  })
});

module.exports = router;